# The script clones the generic utils repository here and initiates the development environment

function assertReturnStatus() { #params(returnStatus, message)
	if [ $1 -ne 0 ]
	then
		echo $2
		exit 1
	fi
}


echo "Cloning generic-utils repository"
git clone "https://code.google.com/p/generic-utils/" generic-utils
assertReturnStatus $? "Failed Cloning generic-utils"

echo "Linking to java-utils source code to be compiled against Android"
cd "generic-utils/android/src/info/fastpace"
ln -s ../../../../java/src/info/fastpace/utils utils
assertReturnStatus $? "Failed linking java-utils sources" 
cd -

